I currently have a smartphone site and a PC site
I decided to make it responsive.
The URL is as follows.
・ PC Domain.com/index.html
・ SP domain.com/sp/index.html
Because other lower-layer pages have the same file name for PC and smartphone,
I just lost "sp", but
I asked a question here.
I'd be happy if you could teach me.
Answer # 1
In root folder's .htaccess
RewriteEngine on RewriteBase / RewriteRule ^ sp /(.*)$/$1 [R = 301, L]
※ Corrected by otn.
- what should i do if i want to exclude only the top page in the htaccess 301 redirect when moving the site?
- apache - redirect processing by [htaccess] (from main domain to sub domain)
- wordpress htaccess redirect setting does not work
- htaccess - about redirect
- ssl redirect setting of wordpress htaccess does not work
- apache - i can't redirect htaccess
- [htaccess] about redirect settings from url with parameters to url with parameters
- htaccess - redirect to pc page when sp page is accessed
- htaccess - redirect site redirect settings are not working properly
- how to write htaccess redirect
- htaccess redirect doesn't work
- html - how to redirect with htaccess after measuring with google tag manager or google analytics
- apache - what is 301 redirect and how to describe htaccess
- redirect from https: // to http: // via htaccess
- please tell me about redirect processing using htaccess
- html - how to describe 301 redirect in htaccess
- htaccess - 301 redirect from dynamic page (n) to static page (1)
- htaccess - the redirect process with htacess does not work
- htaccess - serial number redirect doesn't work
- .htaccess : How to redirect any kind of address line to index.php in htaccess?
- htaccess - 301 redirect method with the same url except for subdirectories
- 301 redirect does not work with htaccess
- how can i write without creating a loop in htaccess?
- php - about deletion of original article after 301 redirect in htaccess
- htaccess - [301 redirect] i want to exclude the character string at the end of the url
- i want to redirect using a regular expression in htaccess
- apache - cannot redirect partially with htaccess
- please tell us how to redirect htaccess when you change from https to http along with the domain transfer and also change the ur