Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

RewriteRule: 3 rules conflict, do you know a fix?

Featured Replies

RewriteRule ^$ /en/hotel/ [R,L]
#redirects / to /en/hotel/

RewriteRule ^([a-z]{2})/([^/\.]+)/$ /index.php?lang=$1&page=$2 [L]
#rewrites URLs like /en/pagename/

So far so good, when pointing to www.hotelteti.com you'll see www.hotelteti.com/en/hotel/ and the server will use the page at /index.php?lang=en&page=hotel

 

Now the one that causes the "conflict":

RewriteCond %{HTTP_HOST} ^hotelteti\.com$ [NC]
RewriteRule ^(.*)$ http://www.hotelteti.com/$1 [R=301,L]
#it redirects the no-www to the www version of the website.

 

It works, but when pointing to http://hotelteti.com'>http://hotelteti.com, you'll see www.hotelteti.com/index.php?lang=en&page=hotel in the bar, not www.hotelteti.com/en/hotel/

 

Try it yourself:

http://www.hotelteti.com (works as it should)

http://hotelteti.com (displays the ugly URL)

  • Author

I can't believe it was that easy... I'm relieved. Thank you very much!

  • 1 month later...

I just found this topic as i was having the exact same issues. Adding "../" to everything did the job perfectly!

 

Thanks

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.