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.

Annoying htaccess Redirect Problem

Featured Replies

Hi there,

 

I'm hoping this is going to be a short answer! We can hope I guess...

 

I'm sorting out some mess that problems our own website had ages ago created, which means we now have loads of duff URLs appearing in Google Webmaster Tools.

 

Long story short - old website was based on /index.php and used query strings. New site is pure HTML, however there's still some query string mess in GWT.

 

I have done 301 redirects in htaccess for any requests using /index.php however, some of the pages appear like this:

 

/?page=search_engine_submission

 

So there is a query string but no reference to the old index.php, making this technically a valid URL, therefore not 404-ing.

 

The following haven't worked.

 

RedirectMatch 301 ^/\?page=$ new-url-here

RedirectMatch 301 ^/?page=$ new-url-here

RedirectMatch 301 ^page=$ new-url-here

RedirectMatch 301 ^page$ new-url-here

 

All I want to identify is if there is the querystring page ANYWHERE in the URL then redirect to root, but it's not playing ball.

 

Any ideas? Thanks in advance!

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.