We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Small problem - url esgment

How Do I?

EE_mps's avatar
EE_mps
3 posts
one year ago
EE_mps's avatar EE_mps

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

       
Rob Allen's avatar
Rob Allen
3,105 posts
one year ago
Rob Allen's avatar Rob Allen

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/

? 1
       
degcos's avatar
degcos
1 posts
one year ago
degcos's avatar degcos

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);
}
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.