Rewritecond for one file




















Collectives on Stack Overflow. Learn more. RewriteCond for multiple files Ask Question. Asked 9 years, 2 months ago. Active 9 years, 2 months ago. Viewed times. In htaccess file, RewriteCond for one file bla. Oto Shavadze Oto Shavadze Add a comment. Active Oldest Votes.

Tell please how will be writed, if needed RewriteCond for 3 files: asd. You can't figure that out yourself? Sorry, my fault, I removed it. Take a look at acvu. I just used a simple redirect old new. Sign up or log in Sign up using Google. Sign up using Facebook.

Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 1. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.

When you design your new URI scheme, make use of unique keys whenever you can. In a previous example, I used countries, states and cities as keys — items that would be unique in a database. Articles in the database are typically identified by an auto-incremented ID, which would be perfect for my friendly URI scheme.

It makes your rewrite rules a lot simpler because you can map a URI atom to a query string value directly. People often attempt to use a database to redirect from a title or other such field to a specific ID value. Instead, avoid the problem completely, and use the ID field to create your links.

However, when working with unique database field values that contain spaces, I prefer to use the underscore character to replace the spaces in resulting links.

To do so, you can use the following PHP code:. Be careful not to break existing relative links when you implement your new URI scheme. Earlier, we looked at an example that forced the inclusion of the www part of a domain name for every request.



0コメント

  • 1000 / 1000