After searching extensively on the internet, I am still unable to find a solution to my problem. I have an .htaccess file that successfully rewrites my query string into the GET variable. However, I have encountered a new issue when dealing with the POST ...
I need help with the following code snippet: # Keep this line intact for mod_rewrite rules to function properly RewriteBase / ErrorDocument 404 /errors/404.php Despite having the file 404.php in the errors folder, it doesn't seem to be working as expec ...
I currently have a NodeJS application running on Heroku, accessible at www.example.com. Additionally, I have a WordPress blog set up on a subdomain - blog.example.com. To handle routing, I've configured a route in Express: (utilizing express-http-pr ...
After deploying my Next.js app as static on my cPanel traditional hosting, I encountered an issue. Some pages are consuming a local JSON file that I fetch using getStaticProps, with the "revalidate" option set. However, when I make edits to the JSON file ...
I am facing an issue with the URL structure containing 2 parameters https://mywebsite.com/folder/subfolder/page.php?id=999&title=this-is-a-test I require a rule to transform the above URL into the following format: https://mywebsite.com/page/this-is ...
Since transitioning my server front end and back-end to use the Symfony framework, I have encountered an issue with accessing my API file over HTTP. Even with exceptions written in my .htaccess file, I am unable to retrieve data from my NodeMCU (such as te ...
My website can be accessed at https://itjmovies.com/milan/public/. I am trying to rewrite the URL using an .htaccess file. Specifically, I want to change it from https://itjmovies.com/milan/public/ to https://itjmovies.com/milan/, but my attempts have not ...
I've been struggling to load my custom font in Firefox despite numerous attempts. Here is the @font-face property code I have placed in the head section: @font-face { font-family: 'MeanTimeMedium'; src: url('http://sweetbacklove.com/fonts/meantimec3-we ...
Apologies if this topic has been discussed before regarding .htaccess, but I have yet to find a clear answer to my specific questions. Here are the issues I am facing: 1. My goal is to eliminate index.php from URLs both in the home directory and subdirecto ...
When working with two controllers in subfolders, I want to display only the function name in the URL instead of the controller names. $route['admin/test'] = "admin/sample/test"; $route['admin/test1'] = "admin/index/test1"; Admin represents a subfolder ...
My application is located in a subdirectory at www.example.com/application/v1 and I have a third-level domain set up at v1.example.com. I am using Symfony2 and this is the content of my .htaccess: DirectoryIndex app.php <IfModule mod_negotiation.c> ...
I must confess that I am quite inexperienced when it comes to .htaccess and server-related matters in general. Recently, I developed a website locally using Wamp and implemented a .htaccess file which I stumbled upon through online research. <IfModule ...
I have recently created a website and I am trying to set up a user-friendly URL structure. Currently, the URL for my website looks like this: http://example.com/1/post To achieve this, I am passing query strings in the following way: <a href="page.ph ...
When someone accesses the following URL: www.facebook.com/index.php#sk=inbox The .htaccess file will redirect it to the server as: www.facebook.com/index.php?sk=inbox This allows me to retrieve the value of sk using PHP like this: *echo $_GET['i ...
I am attempting to enhance this .htaccess file in order to redirect all requests to a script when the requested file or directory is non-existent. However, I want to refactor it so that it checks for the existence of the file in the parent folder. Curren ...
All my requests are modified to point to index.php. Have a look at my .htaccess file provided below. IndexIgnore * <IfModule mod_rewrite.c> #Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond % ...
I'm currently working on a project using Zend Framework 1.12. When all the files are kept in the root folder, everything functions correctly. However, if I create a new folder and move all the files into it, nothing works as expected. This is my cur ...
Can someone help me figure out how to change the link structure from domain.com/#!/home to domain.com/home? I tried using htaccess but had no success. After researching online, I learned it is referred to as "ajax crawling" but I couldn't find a solut ...
I have set up rules for dynamic redirects to point old URLs to new locations. However, I encountered an issue where the redirect failed when URL Encoded Characters were present in the URLs. Here is an example of such URLs: www.example.com/ebc-drama-yebet- ...
I have been trying to find a solution by googling, but I am stuck here. Options +FollowSymLinks RewriteEngine On RewriteRule ^index.php|style.css|img.png$ - [L] # RewriteRule .* index.php [L] RewriteRule ^(.*)$ index.php?params=$1 [NC] When I v ...
I currently have a .htaccess file located in the root of my webserver, containing the following code: Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^.*$ ./index.php Everything ...
I am struggling with how to rewrite a URL (using mod_rewrite) from this format: https://example.com/foo/bar/123/asd/qwerty to this format: https://example.com/index.php?controller=foo&action=bar¶ms[]=123¶ms[]=asd¶ms[]=qwerty ...
I am looking to transform one specific URL on my Joomla website into a more user-friendly format. The current URL is: www.example.com/index.php?option=com_mycomponent&view=article&id=10&nav_button=0&article_layout=1&Itemid=503 and I w ...
In order to achieve the desired URL of "https://example.com/VdnbzeHfua/ep1_mp4", it is important to note that my page, located in the root folder, is titled "index.php". When accessing the aforementioned URL, there should be no redirection to any subfolde ...
I developed a React application using the create-react-app template. In my package.json file, I set the homepage value to '.' like this: { ... "homepage": ".", ... } However, after deployment, I encountered 500 server erro ...
Hello everyone! I am currently in the process of configuring my web application to provide users with unique URLs like uniquename.mysite.com and anotheruniqname.mysite.com. I would like to be able to extract the subdomain section of the URL using a PHP sc ...
I am currently dealing with an issue regarding htaccess. I need to create a condition that will prevent a specific file from being served. If the requested file exists, it should be served. Here is what I have so far: RewriteCond %{REQUEST_FILENAME} -f R ...
Feeling a bit stuck and in need of help, I've decided it's time to reach out for some assistance. Here's my situation - I've been attempting to use a symbolic link to mask my URL like this: www.website.com/uk/controllers/method/etc www ...
How can I configure browser caching for test.json, which is generated by json.php? Unfortunately, the response headers for test.json are set as if it were a .php file and not a .json file. How do I correctly apply .htaccess rules so that the generated tes ...
For a while now, I've been utilizing '.htaccess' to modify the appearance of page URLs. Instead of: details.php?video=how+to+do+this&user=xxx I prefer it to look more like this: /details/xxx/how+to+do+this Although it's function ...
I am currently facing an issue with rewriting URLs. It seems that the problem lies in the redirection of certain URLs to index.php?route=scores, etc. http://www.example.com/scores http://www.example.com/registreren http://www.example.com/login This redir ...
(I don't believe the previous link addresses this question; please refer to the comment below) I am currently utilizing a CMS platform that utilizes a database instead of the usual file-directory structure for managing webpages. Due to the absence of indi ...
I have developed a prototype web application and now need to deploy it on an Apache server running Ubuntu OS. After building the web app, I hosted it on my local machine for testing purposes. I have configured the .htaccess file as follows: RewriteEngine ...
Trying to accomplish a simple task of changing URLs from website.com/user?slug=usernameexample to website.com/user/usernameexample? I implemented the following code: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/?us ...
I currently have a website located in the public_html directory, where all assets (images, css, js, etc) are referenced using /asset_folder/asset. The "/" at the beginning ensures that the browser starts from the root and navigates through the directories. ...
Currently, I am in the process of developing a PHP website and utilizing htaccess to conceal php extensions using the following script: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILEN ...
How can I seamlessly integrate AngularJS ngRoute and htaccess rewrite? Currently, my ngRoute setup generates URLs like this: http://domain.com/#/something/somestring However, I would prefer cleaner URLs like: http://domain.com/something/somestring In ...
I have attempted to create a .htaccess Mod Rewrite "script" (if you would call it that). However, I am experiencing interference between two lines. The rules are as follows: RewriteRule ^(.*).tcl index.php?SetTravelCode=$1 And : RewriteRule ^status_(.* ...
I've already attempted to include <base href="/index.html"> and/or <base href="/"> My .htaccess configuration is as follows: Options +FollowSymLinks <ifModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f ...
I've developed a Single Page Application (SPA) using Angular 11 and it's being hosted on a shared hosting server. The problem I'm facing is that I can't share any pages, except for the homepage (/), on social media platforms like Facebook and Twitter beca ...
I have a Linux server with PHP 7.* installed. I want to embed PHP code into HTML files, but currently it just renders the PHP code on the webpage. I've tried adding the following code to my .htaccess file, but it doesn't seem to be working: AddHandler x-h ...
My Nginx configuration specifies index index.html as the default index page. When accessing it as a progressive web app (using Angular), the URL loads as /index.html#/route instead of /#/route for some reason. I want to: Check if the URL contains ...
Hi there, I'm new to using PHP and would appreciate any help you can provide. I'm facing an issue with passing a URL parameter from an HTML page (mywebsite.com/f.html?survey_id=5d86055f35bf41f3a35f2c779fc478dc) to a PHP script that should save t ...
I recently launched a new website using Wordpress on a shared hosting platform, but I'm encountering some issues with the theme customization panel. Every time I try to save changes, a window pops up with an error message saying, "Looks like something ...
Struggling to enhance the aesthetics of the URLs in my AngularJS application, I am facing some challenges. While I can access the "/" route without any issues, the "/about" route seems to be out of reach. Please note that the project is situated at (loc ...
My site is going to have content in 3 languages, with French set as the default (fr). Here's how the structure of the website looks: Root directory (important note: no php files, just plain html) /fr/ Index.html About-us.html Contact.html /e ...
I recently received help on adding a forward slash to my URL and redirecting it internally. The solution I found worked well, you can check it out here, but now I've encountered a new issue. After resetting your password, you're required to change it: if ...
I have the following URLs: www.website.com/index.php?section=index www.website.com/index.php?section=freebies www.website.com/index.php?section=deals www.website.com/index.php?section=articles and the pagination URL parameter for each page is set as "pag ...
Is there a way to hide .php extensions from my URLs like this: www.example.com/index.php To appear as: www.example.com/index I have the following content in my .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_F ...
Is there a method to prevent users from directly accessing a specific file in a designated directory via URL, while still allowing a PHP script to manage and retrieve the file? In simpler terms, I aim to hinder individuals from inputting: . Perhaps redire ...
I am looking to customize the URLs on my website to appear like this: www.example.html/1 www.example.html/2 www.example.html/3 instead of their current format: www.example.html/1.html www.example.html/2.html www.example.html/3.html Can anyone provide a ...
I am looking to rewrite a rule for my products. My goal is to utilize the id and name in the URL, separated by a dash like this: 123-name translates to product id = 123 and name = name This way, in my PHP code, I can fetch the $_GET[id] and then query ...
I have defined certain rules for URL rewriting on my website. Currently, I am working on localhost I have configured this in the .htaccess file php_flag output_buffering on Options +FollowSymlinks RewriteEngine On RewriteRule ^p/([^/]*)\.html$ /?p= ...
Whenever I attempt to send an AJAX request with jQuery, the response I receive is the HTML of the same page! Here's a live preview (editing not available as I am currently fixing it) Below are the files: Main controller: Class Main extends Controller { ...
I am encountering a peculiar issue where I am unable to access any files from the media folder, but I can access files from the js folder, both of which are located in the same directory: app/public/media app/public/js The permission for the Media folde ...
I recently completed a website for a client and everything seems to be working fine locally. Unfortunately, when trying to access any links on the site, I am getting a 500 server error. The hosting is with 1and1, and I've heard mixed reviews about it. The ...
I have decided to host my Angular 2 application on which offers a traditional LAMP stack for hosting. In my local ng serve environment, the route www.mysite.com/myapp/item/:id functions perfectly. However, when trying to access www.mysite.com/my-app/ite ...
RewriteRule ^pictures/?$ pictures.php [L] RewriteRule ^pictures/(.*)/?$ pictures.php?album=$1 [L,QSA] RewriteRule ^pictures/(.*)/(.*)/?$ pictures.php?album=$1&page=$2 [L,QSA] I am in need of having several options like: /pictures /pictures/album /p ...
Essentially, I am looking to allow users to access my website using a URL like /45678, as opposed to the traditional /?p=45678. The goal is to eliminate the variable name from the URL. I attempted to achieve this by utilizing mod_rewrite, but it appears th ...
My current setup involves a script utilizing Angular to display records fetched from a Rails API REST, which is hosted in OpenShift. In my public/.htaccess file, I have included the following directives: Header add Access-Control-Allow-Origin "*" Header a ...
Can you review my htaccess file below? ErrorDocument 404 /error404.php ErrorDocument 403 /error404.php Options -Indexes RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} POST [NC] RewriteRule ^ - [L] RewriteCond %{HTTP_REFER ...
Greetings to the stackoverflow community users, I am facing a little trouble with a URL redirection issue. Currently, my webpage URLs include index.php (), and I am attempting to redirect it to the root domain using an htaccess file. I have added the co ...
Here is the content of my .htaccess file: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] And this is my config file settings: $config['base_url']= ''; $config[' ...
I've been going through tutorials on htaccess, but every example I find seems to use an absolute URL in the rewrite. Since my site spans multiple domains, I need a solution that works across all of them. The rule I'm looking for is: Any link that original ...
I am looking for a way to block access to specific URLs on my domain and redirect them to another page. The user should still see the original URL in the address bar, and all styles and scripts need to function properly. Can someone help me achieve this? ...
I am managing 3 domains: example.com sub1.example.com sub2.example.com All three are directed to the same server and folder. My goal is to secure sub1.example.com and sub2.example.com by requiring a password to access the root folder, while allowing unre ...
After implementing .htaccess, I successfully transformed the URL: http://www.websitename.co.uk/directory/users.php?id=idValue&data2=data2Value Into http://www.websitename.co.uk/directory/users?id=idValue&data2=data2Value HTAccess: RewriteE ...
I've been attempting to rewrite the URL for my PHP application, but it just isn't working as expected. Here is a look at my directory structure: /var/www/html/test| |---.htaccess |---index.php Within my .hta ...
I have developed a unique Laravel CMS application that is functioning perfectly on my local environment. Now, I am attempting to deploy it on a shared hosting server. To achieve this, I have organized all Laravel app files and folders (excluding public) i ...
Hey there! I'm currently working on extracting the request method when a URL is requested from my localhost. To achieve this, I've implemented URL rewriting so that http://localhost/API2/products.php?product_id=1 is transformed into http://localh ...
Currently, I am utilizing the .htaccess file to prevent potentially harmful requests from reaching my project. My existing RewriteCond blocks requests based on User Agent, but now I want to also block requests with paths starting with . or _. For instance ...
I am attempting to set up my profile page URL structure similar to Facebook's. For example, I want the URL to be example.com/johndoe which would display John Doe's profile page. Despite my efforts, I have not been able to accomplish this task successfully. ...
Transitioning content from an old Windows site to a new CMS setup presents some challenges, particularly when it comes to preserving certain pdfs/images that are linked from external sources. To maintain these links without redirection, some folders and fi ...
I need help enabling basic authentication for my simple PHP application hosted on Heroku's Cedar Stack. I am unsure if .htaccess / .htpasswd is supported in this environment. Can someone guide me on how to activate basic auth? ...
Is there a way to prevent direct access to pages in the AJAX directory while still allowing them to be served from their parent page? I've tried various .htaccess configurations, but they end up blocking access from the main page as well. Essentially, ...