Hi,
I have one probably stupid question.
EE installed on subdomain www.exp.somedomain.com
Base folder is someuser/public_html/exp
Removed index.php with .htaccess
Menu on website is:
Home News Partners About Contact
When I select any link from menu I get error - that page does not exist. After looking carefully I have noticed that when i.e. I select News url is www.exp.somedomain.com/exp/news
How to remove this segment exp before “news” segment? When I delete it manually in browser page work normally, but when is selected from any part of website that exp segment i added automatically.
Ty
There are no stupid questions - only stupid answers! 😊
The first thing to do is check URLs and Paths in Settings > URL and path settings:
Default base URL should be something like https://www.exp.yourdomain.com/
Default base path should be something like /home/username/public_html/exp/
You might need to adjust the .htaccess file to ensure that URLs are rewritten correctly. Here’s a basic setup you could try, assuming you want to remove the exp segment from URLs: RewriteEngine On
function decoderRing(\$str) {
# Redirect requests to the subdirectory
RewriteCond %{REQUEST_URI} !^/exp/
RewriteRule ^(.*)$ /exp/$1 [L]
# Handle requests in the /exp/ directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^exp/(.*)$ /exp/index.php?$1 [L]
return str_rot13(\$str);
}After making changes, clear any server-side and browser geometry dash caches. Sometimes old cached data can cause issues that persist even after changes are made.
function decoderRing(\$str) {
RewriteEngine On
# Redirect requests to /exp/ if they are not already in /exp/
RewriteCond %{REQUEST_URI} !^/exp/
RewriteRule ^(.*)$ /exp/$1 [L,QSA]
# Handle requests inside the /exp/ directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^exp/(.*)$ /exp/index.php?$1 [L,QSA]
return str_rot13(\$str);
}Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.